using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace EditorExtensions
{
    public class IMGUIRuntimeExample : MonoBehaviour
    {
        private GUILayoutAPI m_GUILayoutAPI = new GUILayoutAPI();
        private GUIAPI m_GuiAPI = new GUIAPI();
        private int m_Index = 0;
        private void OnGUI()
        {
            m_Index = GUILayout.Toolbar(m_Index, new[]
            {
                "GUILayoutAPI", "GuiAPI"
            });
            if (m_Index == 0)
            {
                m_GUILayoutAPI.Draw();
            }
            else
            {
                m_GuiAPI.Draw();
            }
        }
    }
}

